package com.cskaoyan.utils;

import com.cskaoyan.bean.brand.brandVo.regionProvinceVo;
import com.cskaoyan.bean.domain.Region;

import java.util.ArrayList;
import java.util.List;

/**
 * @author looper
 * @
 **/
public class MyUtils {

    /**
     * 将所有的long转为integer
     * @param l
     * @return
     */
    public static Integer getInteger(Long l){
     return Integer.parseInt(String.valueOf(l)) ;
    }

    /**
     * zhiMing-查询时字符串判空
     * @param str 查询字符串
     * @return
     */
    public static boolean isEmpty(String str) {
        if (str != null && !"".equals(str))
            return false;
        return true;
    }

    /**
     * @Author: Yr
     * @Description: array数组转list
     */
    public static List<Integer> convertIntArrayToList(Integer[] array) {
        ArrayList<Integer> integers = new ArrayList<>();
        for (Integer roleId : array) {
            integers.add(roleId);
        }
        return integers;
    }

}
